﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestStarter.Model
{
    public class TestGroupItem
    {
        private Nullable<int> _duration { get; set; }

        public string ItemName { get; set; }

        public ItemStatus Status { get; set; }

        public DateTime ItemTestStartDate { get; set; }
        public DateTime ItemTestEndDate { get; set; }

        public Nullable<int> ItemDuration
        {
            get
            {
                if (this._duration == null)
                {
                    this._duration =  this.ItemTestEndDate.Subtract(this.ItemTestStartDate).Seconds;
                }

                return this._duration;
            }

            set
            {
                this._duration = value;
            }
        }
    }
}
